﻿<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Class="FluentFTP.View.ConnectionView"
        Title="Connect" WindowStyle="ToolWindow" ResizeMode="NoResize" Height="221" Width="412">
    <Grid>
    	<Grid.RowDefinitions>
    		<RowDefinition Height="40"/>
    		<RowDefinition Height="40"/>
    		<RowDefinition Height="40"/>
    		<RowDefinition Height="40"/>
    		<RowDefinition Height="30"/>
    	</Grid.RowDefinitions>
    	<Grid.ColumnDefinitions>
    		<ColumnDefinition Width="150"/>
    		<ColumnDefinition Width="*"/>
    	</Grid.ColumnDefinitions>
    	<TextBlock HorizontalAlignment="Right" TextWrapping="Wrap" Text="Saved Servers:" VerticalAlignment="Center" Margin="0,0,8,0"/>
    	<TextBlock HorizontalAlignment="Right" TextWrapping="Wrap" Text="Ftp Adress:" VerticalAlignment="Center" Margin="0,0,8,0" Grid.Row="1"/>
    	<TextBlock Grid.Row="2" HorizontalAlignment="Right" TextWrapping="Wrap" Text="User Name:" VerticalAlignment="Center" Margin="0,0,8,0"/>
    	<TextBlock Grid.Row="3" HorizontalAlignment="Right" TextWrapping="Wrap" Text="Password:" VerticalAlignment="Center" Margin="0,0,8,0"/>
    	<TextBox x:Name="AdressTextBox" TextWrapping="Wrap" d:LayoutOverrides="Height" Grid.Column="1" VerticalAlignment="Center" Margin="8,0" Text="{Binding Server.Adress, UpdateSourceTrigger=PropertyChanged}" Grid.Row="1"/>
        <TextBox x:Name="UserNameTextBox" TextWrapping="Wrap" d:LayoutOverrides="Height" Grid.Column="1" VerticalAlignment="Center" Margin="8,0" Grid.Row="2" Text="{Binding Server.UserName, UpdateSourceTrigger=PropertyChanged}"/>
        <TextBox x:Name="PasswordTextBox" TextWrapping="Wrap" d:LayoutOverrides="Height" Grid.Column="1" VerticalAlignment="Center" Margin="8,0" Grid.Row="3" Text="{Binding Server.Password, UpdateSourceTrigger=PropertyChanged}"/>
    	<StackPanel Grid.Row="4" Grid.ColumnSpan="2" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right">
    		<Button x:Name="CancelButton" Content="Cancel" Margin="0,0,8,0" IsCancel="True" Click="CancelButton_Click" />      
    		<Button x:Name="ConnectButton" Content="Connect" Margin="0,0,8,0" IsDefault="True" Click="ConnectButton_Click" Command="{Binding ConnectCommand}" />
    	</StackPanel>
    	<ComboBox Grid.Column="1" VerticalAlignment="Center" Margin="8,0" ItemsSource="{Binding SavedServers}" DisplayMemberPath="Name" SelectedItem="{Binding SelectedSavedServer}"/>
    	<CheckBox Content="Save Configuration" HorizontalAlignment="Left" VerticalAlignment="Center" Grid.Row="4" Margin="8,0,0,0" IsChecked="{Binding SaveServer}"/>
    </Grid>
</Window>
